<?php
class SwiftYinAction extends Action {
	public function SwiftYin() {
		$stu = D ( 'CourseView' );
		$id = I ( 'id' );
		$map ['itemid'] = $id;
		$list=$stu->where($map)->select();
		$this->assign('list',$list);
		if ($list == null) {
            echo "没有该视频";
        } else {
				$id1=I('id1');
				$map['index1']=$id1;
				$Vurl = $stu->where ( $map )->find ();
				$this->assign ( 'Vurl', $Vurl );
				$this->display ();
			}
		}
		
	
	// 模糊查询
	public function select() {
		$stu = D ( "CourseView" );
		$title = $_POST ['title'];
		$map ['title'] = array (
				'like',
				"%" . $title . "%" 
		);
		$list = $stu->where ( $map )->select ();
		if ($list) {
			$this->assign ( 'list', $list );
			$this->display ();
		} else {
			echo "没找到";
		}
	}
	// 查询
	/*
	 * $stu = D ( 'CourseView' ); //$kai['Course.itemid']=3; //$kai['cid']=3; $list = $stu->where ( 'Course.itemid=3' )->select (); $this->assign ( 'list', $list ); if ($list == null) { $this->success ( '没有相关视频' ); } else { $id = I ( 'id' ); $map['sitemid']=$id; $Vurl=$stu->where($map)->find(); $this->assign('Vurl',$Vurl); $this->display(); } public function SwiftActio(){ $stu=D ('CourseView'); $id=I('id'); $map['sitemid']=$id; $Vurl=$stu->where($map)->find(); $this->assign('Vurl',$Vurl); $this->display(); }
	 */
}
?>